<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue.directive</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
<h1>Extends Optin Demo</h1>
<hr>
<div id="app">
    {{message}}
    <p><button @click="add">add</button></p>
</div>
<script type="text/javascript">
    var bbb={
        created:function(){
            console.log("我是被扩展出来的");
        },
        methods:{
            add:function(){
                console.log('我是被扩展出来的方法！');
            }
        }
    };
    var app=new Vue({
        el:'#app',
        data:{
            message:'hello Vue!'
        },
        methods:{
            add:function(){
                console.log('我是原生方法');
            }
        },
        extends:bbb
    })
</script>
</body>
</html>
</html>